3.345 \(\int \sqrt {-c+d x} \sqrt {c+d x} (a+b x^2) \, dx\)

Optimal. Leaf size=114 \[ \frac {x \sqrt {d x-c} \sqrt {c+d x} \left (4 a d^2+b c^2\right )}{8 d^2}-\frac {c^2 \left (4 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{4 d^3}+\frac {b x (d x-c)^{3/2} (c+d x)^{3/2}}{4 d^2} \]

[Out]

1/4*b*x*(d*x-c)^(3/2)*(d*x+c)^(3/2)/d^2-1/4*c^2*(4*a*d^2+b*c^2)*arctanh((d*x-c)^(1/2)/(d*x+c)^(1/2))/d^3+1/8*(
4*a*d^2+b*c^2)*x*(d*x-c)^(1/2)*(d*x+c)^(1/2)/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {389, 38, 63, 217, 206} \[ \frac {x \sqrt {d x-c} \sqrt {c+d x} \left (4 a d^2+b c^2\right )}{8 d^2}-\frac {c^2 \left (4 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{4 d^3}+\frac {b x (d x-c)^{3/2} (c+d x)^{3/2}}{4 d^2} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2),x]

[Out]

((b*c^2 + 4*a*d^2)*x*Sqrt[-c + d*x]*Sqrt[c + d*x])/(8*d^2) + (b*x*(-c + d*x)^(3/2)*(c + d*x)^(3/2))/(4*d^2) -
(c^2*(b*c^2 + 4*a*d^2)*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x]])/(4*d^3)

Rule 38

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(x*(a + b*x)^m*(c + d*x)^m)/(2*m + 1)
, x] + Dist[(2*a*c*m)/(2*m + 1), Int[(a + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] &&
EqQ[b*c + a*d, 0] && IGtQ[m + 1/2, 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 389

Int[((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symb
ol] :> Simp[(d*x*(a1 + b1*x^(n/2))^(p + 1)*(a2 + b2*x^(n/2))^(p + 1))/(b1*b2*(n*(p + 1) + 1)), x] - Dist[(a1*a
2*d - b1*b2*c*(n*(p + 1) + 1))/(b1*b2*(n*(p + 1) + 1)), Int[(a1 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /;
 FreeQ[{a1, b1, a2, b2, c, d, n, p}, x] && EqQ[non2, n/2] && EqQ[a2*b1 + a1*b2, 0] && NeQ[n*(p + 1) + 1, 0]

Rubi steps

\begin {align*} \int \sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right ) \, dx &=\frac {b x (-c+d x)^{3/2} (c+d x)^{3/2}}{4 d^2}-\frac {\left (-b c^2-4 a d^2\right ) \int \sqrt {-c+d x} \sqrt {c+d x} \, dx}{4 d^2}\\ &=\frac {\left (b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^2}+\frac {b x (-c+d x)^{3/2} (c+d x)^{3/2}}{4 d^2}+\frac {\left (c^2 \left (-b c^2-4 a d^2\right )\right ) \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx}{8 d^2}\\ &=\frac {\left (b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^2}+\frac {b x (-c+d x)^{3/2} (c+d x)^{3/2}}{4 d^2}-\frac {\left (c^2 \left (b c^2+4 a d^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{4 d^3}\\ &=\frac {\left (b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^2}+\frac {b x (-c+d x)^{3/2} (c+d x)^{3/2}}{4 d^2}-\frac {\left (c^2 \left (b c^2+4 a d^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{4 d^3}\\ &=\frac {\left (b c^2+4 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{8 d^2}+\frac {b x (-c+d x)^{3/2} (c+d x)^{3/2}}{4 d^2}-\frac {c^2 \left (b c^2+4 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{4 d^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 129, normalized size = 1.13 \[ \frac {d x \left (c^2-d^2 x^2\right ) \left (b \left (c^2-2 d^2 x^2\right )-4 a d^2\right )-2 c^{5/2} \sqrt {d x-c} \sqrt {\frac {d x}{c}+1} \left (4 a d^2+b c^2\right ) \sinh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {2} \sqrt {c}}\right )}{8 d^3 \sqrt {d x-c} \sqrt {c+d x}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2),x]

[Out]

(d*x*(c^2 - d^2*x^2)*(-4*a*d^2 + b*(c^2 - 2*d^2*x^2)) - 2*c^(5/2)*(b*c^2 + 4*a*d^2)*Sqrt[-c + d*x]*Sqrt[1 + (d
*x)/c]*ArcSinh[Sqrt[-c + d*x]/(Sqrt[2]*Sqrt[c])])/(8*d^3*Sqrt[-c + d*x]*Sqrt[c + d*x])

________________________________________________________________________________________

fricas [A]  time = 1.13, size = 88, normalized size = 0.77 \[ \frac {{\left (2 \, b d^{3} x^{3} - {\left (b c^{2} d - 4 \, a d^{3}\right )} x\right )} \sqrt {d x + c} \sqrt {d x - c} + {\left (b c^{4} + 4 \, a c^{2} d^{2}\right )} \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right )}{8 \, d^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

1/8*((2*b*d^3*x^3 - (b*c^2*d - 4*a*d^3)*x)*sqrt(d*x + c)*sqrt(d*x - c) + (b*c^4 + 4*a*c^2*d^2)*log(-d*x + sqrt
(d*x + c)*sqrt(d*x - c)))/d^3

________________________________________________________________________________________

giac [B]  time = 0.35, size = 288, normalized size = 2.53 \[ \frac {24 \, {\left (2 \, c \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right ) + \sqrt {d x + c} \sqrt {d x - c}\right )} a c + 4 \, {\left (\sqrt {d x + c} \sqrt {d x - c} {\left ({\left (d x + c\right )} {\left (\frac {2 \, {\left (d x + c\right )}}{d^{2}} - \frac {7 \, c}{d^{2}}\right )} + \frac {9 \, c^{2}}{d^{2}}\right )} + \frac {6 \, c^{3} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{2}}\right )} b c + {\left ({\left ({\left (d x + c\right )} {\left (2 \, {\left (d x + c\right )} {\left (\frac {3 \, {\left (d x + c\right )}}{d^{3}} - \frac {13 \, c}{d^{3}}\right )} + \frac {43 \, c^{2}}{d^{3}}\right )} - \frac {39 \, c^{3}}{d^{3}}\right )} \sqrt {d x + c} \sqrt {d x - c} - \frac {18 \, c^{4} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{3}}\right )} b d - 12 \, {\left (2 \, c^{2} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right ) - \sqrt {d x + c} \sqrt {d x - c} {\left (d x - 2 \, c\right )}\right )} a}{24 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2),x, algorithm="giac")

[Out]

1/24*(24*(2*c*log(abs(-sqrt(d*x + c) + sqrt(d*x - c))) + sqrt(d*x + c)*sqrt(d*x - c))*a*c + 4*(sqrt(d*x + c)*s
qrt(d*x - c)*((d*x + c)*(2*(d*x + c)/d^2 - 7*c/d^2) + 9*c^2/d^2) + 6*c^3*log(abs(-sqrt(d*x + c) + sqrt(d*x - c
)))/d^2)*b*c + (((d*x + c)*(2*(d*x + c)*(3*(d*x + c)/d^3 - 13*c/d^3) + 43*c^2/d^3) - 39*c^3/d^3)*sqrt(d*x + c)
*sqrt(d*x - c) - 18*c^4*log(abs(-sqrt(d*x + c) + sqrt(d*x - c)))/d^3)*b*d - 12*(2*c^2*log(abs(-sqrt(d*x + c) +
 sqrt(d*x - c))) - sqrt(d*x + c)*sqrt(d*x - c)*(d*x - 2*c))*a)/d

________________________________________________________________________________________

maple [C]  time = 0.06, size = 182, normalized size = 1.60 \[ \frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (2 \sqrt {d^{2} x^{2}-c^{2}}\, b \,d^{3} x^{3} \mathrm {csgn}\relax (d )-4 a \,c^{2} d^{2} \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )+4 \sqrt {d^{2} x^{2}-c^{2}}\, a \,d^{3} x \,\mathrm {csgn}\relax (d )-b \,c^{4} \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )-\sqrt {d^{2} x^{2}-c^{2}}\, b \,c^{2} d x \,\mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )}{8 \sqrt {d^{2} x^{2}-c^{2}}\, d^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2),x)

[Out]

1/8*(d*x-c)^(1/2)*(d*x+c)^(1/2)*(2*csgn(d)*x^3*b*d^3*(d^2*x^2-c^2)^(1/2)+4*csgn(d)*d^3*(d^2*x^2-c^2)^(1/2)*x*a
-csgn(d)*d*(d^2*x^2-c^2)^(1/2)*x*b*c^2-4*ln((d*x+(d^2*x^2-c^2)^(1/2)*csgn(d))*csgn(d))*a*c^2*d^2-ln((d*x+(d^2*
x^2-c^2)^(1/2)*csgn(d))*csgn(d))*b*c^4)*csgn(d)/(d^2*x^2-c^2)^(1/2)/d^3

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 137, normalized size = 1.20 \[ -\frac {b c^{4} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{8 \, d^{3}} - \frac {a c^{2} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{2 \, d} + \frac {1}{2} \, \sqrt {d^{2} x^{2} - c^{2}} a x + \frac {\sqrt {d^{2} x^{2} - c^{2}} b c^{2} x}{8 \, d^{2}} + \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} b x}{4 \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

-1/8*b*c^4*log(2*d^2*x + 2*sqrt(d^2*x^2 - c^2)*d)/d^3 - 1/2*a*c^2*log(2*d^2*x + 2*sqrt(d^2*x^2 - c^2)*d)/d + 1
/2*sqrt(d^2*x^2 - c^2)*a*x + 1/8*sqrt(d^2*x^2 - c^2)*b*c^2*x/d^2 + 1/4*(d^2*x^2 - c^2)^(3/2)*b*x/d^2

________________________________________________________________________________________

mupad [B]  time = 17.43, size = 734, normalized size = 6.44 \[ \frac {a\,x\,\sqrt {c+d\,x}\,\sqrt {d\,x-c}}{2}-\frac {\frac {b\,c^4\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}{2\,\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}+\frac {35\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^3}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^3}+\frac {273\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^5}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^5}+\frac {715\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^7}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^7}+\frac {715\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^9}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^9}+\frac {273\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{11}}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{11}}+\frac {35\,b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{13}}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{13}}+\frac {b\,c^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{15}}{2\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{15}}}{d^3-\frac {8\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {28\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {56\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}+\frac {70\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^8}-\frac {56\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{10}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{10}}+\frac {28\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{12}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{12}}-\frac {8\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{14}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{14}}+\frac {d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^{16}}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^{16}}}-\frac {a\,c^2\,\ln \left (d\,x+\sqrt {c+d\,x}\,\sqrt {d\,x-c}\right )}{2\,d}+\frac {b\,c^4\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,d^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)*(c + d*x)^(1/2)*(d*x - c)^(1/2),x)

[Out]

(a*x*(c + d*x)^(1/2)*(d*x - c)^(1/2))/2 - ((b*c^4*((c + d*x)^(1/2) - c^(1/2)))/(2*((-c)^(1/2) - (d*x - c)^(1/2
))) + (35*b*c^4*((c + d*x)^(1/2) - c^(1/2))^3)/(2*((-c)^(1/2) - (d*x - c)^(1/2))^3) + (273*b*c^4*((c + d*x)^(1
/2) - c^(1/2))^5)/(2*((-c)^(1/2) - (d*x - c)^(1/2))^5) + (715*b*c^4*((c + d*x)^(1/2) - c^(1/2))^7)/(2*((-c)^(1
/2) - (d*x - c)^(1/2))^7) + (715*b*c^4*((c + d*x)^(1/2) - c^(1/2))^9)/(2*((-c)^(1/2) - (d*x - c)^(1/2))^9) + (
273*b*c^4*((c + d*x)^(1/2) - c^(1/2))^11)/(2*((-c)^(1/2) - (d*x - c)^(1/2))^11) + (35*b*c^4*((c + d*x)^(1/2) -
 c^(1/2))^13)/(2*((-c)^(1/2) - (d*x - c)^(1/2))^13) + (b*c^4*((c + d*x)^(1/2) - c^(1/2))^15)/(2*((-c)^(1/2) -
(d*x - c)^(1/2))^15))/(d^3 - (8*d^3*((c + d*x)^(1/2) - c^(1/2))^2)/((-c)^(1/2) - (d*x - c)^(1/2))^2 + (28*d^3*
((c + d*x)^(1/2) - c^(1/2))^4)/((-c)^(1/2) - (d*x - c)^(1/2))^4 - (56*d^3*((c + d*x)^(1/2) - c^(1/2))^6)/((-c)
^(1/2) - (d*x - c)^(1/2))^6 + (70*d^3*((c + d*x)^(1/2) - c^(1/2))^8)/((-c)^(1/2) - (d*x - c)^(1/2))^8 - (56*d^
3*((c + d*x)^(1/2) - c^(1/2))^10)/((-c)^(1/2) - (d*x - c)^(1/2))^10 + (28*d^3*((c + d*x)^(1/2) - c^(1/2))^12)/
((-c)^(1/2) - (d*x - c)^(1/2))^12 - (8*d^3*((c + d*x)^(1/2) - c^(1/2))^14)/((-c)^(1/2) - (d*x - c)^(1/2))^14 +
 (d^3*((c + d*x)^(1/2) - c^(1/2))^16)/((-c)^(1/2) - (d*x - c)^(1/2))^16) - (a*c^2*log(d*x + (c + d*x)^(1/2)*(d
*x - c)^(1/2)))/(2*d) + (b*c^4*atanh(((c + d*x)^(1/2) - c^(1/2))/((-c)^(1/2) - (d*x - c)^(1/2))))/(2*d^3)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b x^{2}\right ) \sqrt {- c + d x} \sqrt {c + d x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2),x)

[Out]

Integral((a + b*x**2)*sqrt(-c + d*x)*sqrt(c + d*x), x)

________________________________________________________________________________________